FROM registry.cn-shanghai.aliyuncs.com/lianbin/idata:v3

WORKDIR ${AIRFLOW_HOME}

ADD airflow ${AIRFLOW_HOME}/airflow
ADD setup.cfg ${AIRFLOW_HOME}/setup.cfg
ADD setup.py ${AIRFLOW_HOME}/setup.py
ADD health.py ${AIRFLOW_HOME}/health.py
ADD airflow.cfg ${AIRFLOW_HOME}/airflow.cfg
ADD pod_template_file.yaml ${AIRFLOW_HOME}/pod_template_file.yaml

RUN mkdir /opt/tpl/

RUN chown -R airflow:root /home/airflow && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

RUN pip install --timeout 60 -i https://mirrors.aliyun.com/pypi/simple wheel --use-feature=2020-resolver
RUN pip install -i https://mirrors.aliyun.com/pypi/simple -e . --use-feature=2020-resolver
RUN pip install statsd==3.3.0
RUN rm -rf setup*

CMD ["airflow", "scheduler"]














